﻿using WMSpublic;

namespace Warehouse.Read.API.HttpShow
{
    public class HttpShowItem
    {

        /// <summary>
        /// 显示产品信息
        /// </summary>
        /// <param name="productsCode"></param>
        /// <param name="productsName"></param>
        /// <param name="pindex"></param>
        /// <param name="psize"></param>
        /// <returns></returns>
        public async Task<dynamic> GetProductList(string? productsCode, string? productsName, int pindex, int psize)
        {
            string token = "yJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIyOCIsInNpZCI6IjE4NTk4MDM1MDY2MzA4NTY3MDQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL2dyb3Vwc2lkIjoiMiwyIiwianRpIjoiNDMzMDY2ZGYtZjI2MC00MjY3LWJhZjktYmQzODFkZWFkYzBiIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbmFtZSI6IuWwj-e-jiIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL3VyaSI6IiIsImlzcyI6IlJlbmFvYm8yMDA0IiwiYXVkIjoiV2VpZnV3dTIyMDNBIn0.F6NVEvAxW0LXOqPcIA8hWoL54BSxdIQTFtrJ9r0Ah18";
            HttpClientWrapper cilent = new HttpClientWrapper(token);

            string chanpin = "http://116.205.121.197:8000/cpd/api/ProductRead/GetAllProductInfo?productsCode=" + productsCode + "&productsName=" + productsName + "&pageindex=" + pindex + "&pagesize=" + psize;

            string postReponse = await cilent.GetAsync(chanpin);
            return postReponse;
        }

    }
}
